"""
	from liwe import liwe
	from liwe.fake import FakePyHP

	l = liwe ( pyhp = FakePyHP (), cfg = 'tree-test.cfg', home_dir = 'work' )
"""
import sys

class FakeObj:
	def __init__ ( self ):
		pass

	def __getattr__ ( self, name ):
		return name

class FakeLog ( FakeObj ):
	def error ( self, txt ):
		sys.stderr.write ( txt )

class FakeSession ( FakeObj ): 
	def __init__ ( self ):
		self.data = {}

	def start ( self, * args, ** kwargs ): pass


class FakePyHP:
	def __init__ ( self ):
		self.env = { "wsgi.url_scheme" : "file", "SERVER_NAME" : "FAKE", "SERVER_PORT" : "1234" }
		self.log = FakeLog ()
		self.session = FakeSession ()
